package com.xxx.abs;

/**
 * @version v1.0
 * @Description:
 * @Author zhanzhongxin
 * @Date 2021/7/14 13:38
 * @Copyright 博为峰
 */
public class Circle {
    private double diameter;

    public Circle() {
    }

    public Circle(double diameter) {
        this.diameter = diameter;
    }

    public double getDiameter() {
        return diameter;
    }

    public void setDiameter(double diameter) {
        this.diameter = diameter;
    }

    public double area() {
        return Math.PI * Math.pow(diameter / 2, 2);
    }

    public double perimeter() {
        return Math.PI * diameter;
    }
}
